using System.Collections.Generic;

namespace WB.Mvc.Forms.Widgets
{
	/// <summary>
	/// Base class for widget's that facilitate input from a list of choices.
	/// </summary>
	public abstract class ChoiceWidget: Widget
	{
		private IList<ChoiceOption> options;

		protected ChoiceWidget(string name) : this(name, new Dictionary<string, object>())
		{
		}

		protected ChoiceWidget(string name, IDictionary<string, object> attributes)
			: base(name, attributes)
		{
			options = new List<ChoiceOption>();
		}

		public virtual IList<ChoiceOption> Options { get { return options; } set { options = value; } }
	}
}